import time
def seq(x) :
    return x*x
while True :
    print('Please input a num ')
    time.sleep(0.5)
    num = input()
    try:
        num = int(num)
    except ValueError:
        if num == 'q' or num == 'exit':
            break
        print('your input is not a number')
        continue
    except KeyboardInterrupt:
        print("\nProgram interrupted by user")
        break
    except EOFError:
        print("\nEnd of input reached")
        break
    print (f'{num} seq is {seq(num)}')